home *** CD-ROM | disk | FTP | other *** search
- #include <QDOffscreen.h>
-
- void CheckError(Str255 err, short code)
- {
- if(code)
- {
- asm { move.w code, d0 }
- DebugStr(err);
- }
- }
-
- void TryRemoveResource(ResType type, short ID)
- {
- Handle h;
- short err;
-
- h = GetResource(type,ID);
- if(h)
- RmveResource(h);
- }
-
-
- void DrawImage(WindowPtr wp)
- //•••∞∞∞•∞•∞•∞•∞•∞
- // THIS JUST DRAWS THE WINDOW - stolen from PaletteAnimation sample...
- // DEPANDANT UPON: a gWorldPtr being stuffed into the window's refcon field.
- //•••∞∞∞•∞•∞•∞•∞•∞
- {
- GWorldPtr gw;
- WindowPtr savePort;
-
- GetPort(&savePort);
- SetPort(wp);
- gw = (GWorldPtr)GetWRefCon(wp);
-
- LockPixels (GetGWorldPixMap (gw));
- CopyBits (&((GrafPtr) gw)->portBits, &(wp)-> portBits,
- &gw->portRect, &wp->portRect, srcCopy, nil);
- UnlockPixels (GetGWorldPixMap (gw));
- SetPort(savePort);
- }
-